<template>
  <div>
    <el-form ref="searchForm" :inline="true" :model="searchData" class="ele-form-search">
      <el-form-item>
        <el-input v-model="searchData.name" placeholder="名称" clearable />
      </el-form-item>
      <el-form-item>
        <el-button class="ele-btn-icon" icon="el-icon-search" type="primary" @click="search">查询</el-button>
        <el-button type="default" @click="reset('searchForm')">重置</el-button>
        <el-button type="success" icon="el-icon-plus" @click="add">新增设备</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
export default {
  data() {
    return {
      searchData: {
        name: ''
      }
    }
  },
  methods: {
    search() {
      this.$emit('search', this.searchData)
    },
    reset() {
      this.$emit('reset')
    },
    add() {
      this.$emit('add')
    }
  }
}
</script>

<style lang="scss" scoped>

</style>
